<?php namespace Home\Controller; 

use Hdphp\Controller\Controller;
use Home\Model\News;

class NewsController extends Controller{
	protected $db;

	public function __init()
	{
		$this->db = new News;
	}
	public function add()
	{
		$this->display();
	}
	public function doAdd()
	{
		if($this->db->storage())
		{
			echo 'ok';
		}else
		{
			$this->error($this->db->getError());
		}
	}
}






